package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLGraphics;
import HLLib.control.HLVScrollBar;

public class HLClassVScrollBar extends HLLibClass {
    public HLClassVScrollBar(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLVScrollBar();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLVScrollBar) self).SetSize(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 1: {
            ((HLVScrollBar) self).SetPos(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 2: {
            ((HLVScrollBar) self).SetColor(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 3: {
            ((HLVScrollBar) self).SetDragColor(args.GetInt(0));
            break;
        }
        case 4: {
            ((HLVScrollBar) self).Logic();
            break;
        }
        case 5: {
            ((HLVScrollBar) self).Refresh();
            break;
        }
        case 6: {
            ((HLVScrollBar) self).Render((HLGraphics)args.GetObject(0));
            break;
        }
        case 7: {
            ((HLVScrollBar) self).SetValue(args.GetInt(0));
            break;
        }
        case 8: {
            ((HLVScrollBar) self).SetVisable(args.GetBoolean(0));
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                ((HLVScrollBar) self).GetVisable();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLVScrollBar) self).GetVisable());
            }
            break;
        }
        case 10: {
            ((HLVScrollBar) self).SetWidth(args.GetInt(0));
            break;
        }
        case 11: {
            if (resultOwnerObject == null) {
                ((HLVScrollBar) self).GetWidth();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLVScrollBar) self).GetWidth());
            }
            break;
        }
        case 12: {
            ((HLVScrollBar) self).SetHeight(args.GetInt(0));
            break;
        }
        case 13: {
            if (resultOwnerObject == null) {
                ((HLVScrollBar) self).GetHeight();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLVScrollBar) self).GetHeight());
            }
            break;
        }
        }
    }
}
